<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let arr = [
        {id: 1, name: 'jack1', age: 21},
        {id: 2, name: 'jack2', age: 22},
        {id: 5, name: 'jack5', age: 23},
        {id: -1, name: 'jack-1', age: 24},
        {id: 8, name: 'jack8', age: 29},
        {id: 9, name: 'jack9', age: 29},
    ];

     let arr2= arr.findIndex(item => item.id === -1);
    console.log(arr2)

</script>
</body>
</html>
